POV-Ray : Newsgroups : povray.general : evenly spaced points on splines : Re: evenly spaced points on splines Server Time
30 Jul 2024 22:26:40 EDT (-0400)
  Re: evenly spaced points on splines  
From: Tim Attwood
Date: 13 Apr 2008 18:15:55
Message: <4802861b@news.povray.org>
// calculate the length of a spline
#macro Len_Spline(Espl begin_at stop_at num)
   #local c = 1/num;
   #local V1 = Espl(begin_at);
   #local result = 0;
   #while (c <= 1)
      #local V2 = Espl( c*(stop_at - begin_at) + begin_at);
      #local result = result + vlength(V2-V1);
      #local V1 = V2;
      #local c = c + 1/num;
   #end
   (result)
#end


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.